package day9;

import java.io.FileOutputStream;
import java.io.IOException;
import java.io.ObjectOutputStream;
import java.util.*;

/**
 * @author oldliu
 * @since 1.0
 */
public class StoreAccout {
    public static void main(String[] args) {
        List<Account> lis=new ArrayList<>();
        lis.add(new Account("333-1","老刘",39999.0F,"123456"));
        lis.add(new Account("333-2","小陈",366699.6F,"3333333"));
        lis.add(new Account("333-5","小马",100000000.6F,"asd"));
        try {
            ObjectOutputStream oout=new ObjectOutputStream(new FileOutputStream("bank.obj"));
            oout.writeObject(lis);
            oout.close();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
